package com.fdb.smcts.core.threadpool;

import java.util.concurrent.Callable;

import com.fdb.smcts.core.exception.BizException;
import com.fdb.smcts.core.exception.HangException;

public abstract class AbstractThreadTask implements Callable<ExecuteRtnInfo> {

	public ExecuteRtnInfo call() throws Exception {
		try {
			doTask();
			return new ExecuteRtnInfo(null, null, null, null, true);
		} catch (Exception e) {
			return new ExecuteRtnInfo(null, e.getMessage(), e, null, false);
		}
	}

	public abstract void doTask() throws HangException, BizException, Exception;

}
